1. Field of the Invention
The invention relates generally to the field of image processing. More specifically, the invention relates to the detecting of features within images.
2. Description of the Related Art
In the art of image processing, images of an object/scene can be characterized by certain features. One important such image feature an image "edge" feature. An edge of an image may be defined by the abruptness in intensity and/or color change between a first region of pixels and second region of pixels. Along the boundary between the two regions, a group of pixels on either side may be classified as "edge" pixels or pixels belonging to an edge feature. For instance, as an extreme example of an edge feature, consider three rows of pixel having a color of pure blue and two rows of white color pixels consecutively following the three blue rows. The pixels of the 3rd and 4th rows, of blue and white color, respectively, may each be thought of as an edge. Since there is an abrupt and large differential in color and intensity between the 3rd and 4th row, these pixels are on the "edge" and collectively represent an edge feature. By contrast a row of pixels of color white and a subsequent adjacent row of pixels of an off-white color would less likely be considered as an edge feature since the intensity change would not be large and abrupt enough to be classified as an edge. The field of art known as edge detection presents techniques for detecting and discriminating edges and provides various forms of data and statistics regarding the edge information in an image useful in image processing applications.
The classification of image into edge features has many important applications in image processing and rendering. One important application is the sharpening of image by removing blurriness and enhancing edges. Another application is shape or pattern recognition which may be used in computer vision or OCR (Optical Character Recognition). Such applications are heavily dependent upon the success of the edge detection process. If edges cannot be detected they cannot be enhanced, and if a non-edge to edge boundary is not properly identified, a blur will remain a blur. Edge detection may fail in one of two ways: "false" edges may be created, i.e., features that are not edges are classified as edges, or edges may be destroyed, i.e., features that are edges are classified as non-edge features and then so processed to decimate the edge.
The edge detection problem has been approached from many different angles. One approach is to consider an edge as a change in the intensity level from one pixel or region to another. An operator (mathematical function(s) applied upon a set of data), such as a gradient operator, which is capable of measuring this change can thus be utilized in edge detection. In addition to computing the change(s) in intensity level using some form of operator, the edge detector must also be possessed of a threshold value that indicates whether a given intensity value change can be classified as representing an edge or non-edge region or pixel. A comparison between the threshold and measured intensity change decides whether a pixel belongs to an edge or not. Most threshold-based edge detectors try to fix a predefined threshold that is applicable over an entire image and further, applied to every image generated by a particular imaging device or process. This is problematic because within an image certain features such as a shadow can wreak havoc with the edge detection process. For instance, if part of an image is in the shadow of a light source while the other regions of the image are in the brighter area of the light source, the intensity variations in the shadow area will not compare well to detect the edges as may the edges in the brighter area. The shadow region will show less change in intensity, since the intensity values are in a lower and more narrow range than the brighter area of the image for an identical edge feature. As a result, if a high threshold value is set, the edge features present in the shadow region of the image will be mis-classified as non-edge features.
To correct the problem, it may thus be necessary to set a lower threshold. But often, the setting a low threshold will lead to the opposite problem of introducing false edges. While a low threshold may work for one image or type of image, it may produce poor edge detection results for another type of image by introducing false edges. Thus, from image to image, the threshold value has often been set by a manual process, where a user selects a threshold for a particular image. The selecting of a threshold is often achieved through trial and error--a threshold is tested against every image and the results analyzed later. Further, most edge detectors ignore the localized intensity range problem because the threshold is applied everywhere throughout the image. One the most well-known and effective edge detectors that have developed, the Canny edge detector, uses hysteresis thresholding. In hysteresis thresholding, a high threshold and low threshold are set, and in a first pass all pixels with intensity value change (gradients) greater than the high threshold are deemed to be edge pixels. In the next pass, any pixels adjacent to or closely neighboring edge pixels that are greater than the low threshold are also classified as edge-pixels. Even with the Canny edge detector, the high and low threshold values constituting the hysteresis are currently both selected manually.
Thus it would be desirable to provide an improved edge detector that automatically selects the threshold value from image to image without user intervention. Further, as discussed earlier, it would be desirable to account for potential local intensity characteristics within an image so that the threshold value can be tuned locally within regions of the same image. Further, as edge detection is typically implemented in software due the cost of computation, it would be desirable to devise a technique that is suitable for fast hardware implementation so that a digital camera or robotic eye can have automatic hardware based edge detection capability.